package cn.bugstack.xfg.dev.tech.config;

import cn.bugstack.xfg.dev.tech.config.authorization.RedisClientDetailsService;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.connection.RedisConnectionFactory;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.security.crypto.password.PasswordEncoder;

//@Configuration
//public class RedisClientDetailsServiceConfig {
//
//    @Bean
//    public RedisClientDetailsService redisClientDetailsService(RedisConnectionFactory redisConnectionFactory) {
//        RedisClientDetailsService clientDetailsService = new RedisClientDetailsService(redisConnectionFactory);
//        clientDetailsService.setPasswordEncoder(passwordEncoder());
//        return clientDetailsService;
//    }
//
//    @Bean
//    public PasswordEncoder passwordEncoder() {
//        return new BCryptPasswordEncoder();
//    }
//}